<%@ page language="java" contentType="text/html; charset=utf-8" errorPage="/404.jsp" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>房屋信息管理-房屋详情</title>
    <style type="text/css">
        @import url("<c:url value='/css/main.css'/>");
    </style>
</head>


<body>
<div class="div_main">
    <div class="div_header">后勤人员-详细信息</div>
    <h1 align="center">
        <a href="${pageContext.request.contextPath}/user/list.action">
            返回首页
        </a>
    </h1>
    <c:if test="${not empty worker}">
        <div class="div_data">
            <table class="tab_list">
                <tr>
                    <th>序号</th>
                    <th>姓名</th>
                    <th>登陆密码</th>
                    <th>性别</th>
                    <th>职位</th>
                    <th>电话</th>
                    <th>状态</th>
                    <th>入职时间</th>
                    <th>角色</th>

                    <th>操作</th>
                </tr>

                <tr>
                    <td>${worker.wid}</td>
                    <td>${worker.wname}</td>
                    <td>${worker.wpwd}</td>
                    <td>${worker.wsex}</td>
                    <td>${worker.wjob}</td>
                    <td>${worker.wphone}</td>
                    <td>${worker.wstatus}</td>
                    <td>${worker.wintime}</td>
                    <td>${worker.wrose}</td>
                    <td>
                        &nbsp;&nbsp;
                        <a href="${pageContext.request.contextPath}/user/getOne.action?id=${worker.wid}&method=update">编辑</a>

                        &nbsp;&nbsp;
                        <a href="#" onclick="confirmDelete(${worker.wid})">删除</a>
                        <script>
                            function confirmDelete(id) {
                                if (confirm("确定要删除码？")) {
                                    window.location = "${pageContext.request.contextPath}/user/deleteOne.action?id=" + id;
                                    // 重定向
                                }
                                return false;
                            }
                        </script>
                    </td>
                </tr>


            </table>
        </div>
    </c:if>


</div>
</body>
</html>

